import axios from 'axios';

const prefix = process.env.NODE_ENV === 'development' ? '/api' : '';
const parent_category = prefix + '/common/category/knowledge/list';

export default {
  fetchParentCategory: function (callback, errorHandler) {
    axios.get(parent_category).then(function (resp) {
       callback(resp.data.mapList);
    }).catch(function (resp) {
      errorHandler(resp);
    });
  }
}
